//
//  InfoViewController.swift
//  LXQWB
//
//  Created by 江海天 on 2017/7/11.
//  Copyright © 2017年 江海天. All rights reserved.
//

import UIKit

class InfoViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
		view.backgroundColor = UIColor.white
		let filter = CIFilter(name: "CIQRCodeGenerator")
		filter?.setDefaults()
		filter?.setValue("刘晓琪".data(using: String.Encoding.utf8), forKey: "InputMessage")
		guard let ciImage = filter?.outputImage else{
			return
		}
		imageView.image = UIImage(ciImage: ciImage)
		
		view.addSubview(imageView)
		// Do any additional setup after
		
    }
	private lazy var imageView = UIImageView(frame: CGRect(x: 30.0, y: 100.0, width: 150.0, height: 150.0))

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
